package com.haoze.common.enumeration;

/**
 * 状态类枚举
 *
 * @author fcx
 * @date 2019年2月14日15:33:59
 */
public enum CirculationModelEnum {
    WAIT_IN_HOSP("wait_in_hosp", "待入院"),
    FINISH_IN_HOSP("finish_in_hosp", "已入院"),
    CANCLE_IN_HOSP("cancle_in_hosp", "取消入院"),

    WAIT_IN_DEPT("wait_in_dept", "待入科"),
    FINISH_IN_DEPT("finish_in_dept", "已入科"),
    CANCLE_IN_DEPT("cancle_in_dept", "取消入科"),

    WAIT_OUT_DEPT("wait_out_dept", "待出科"),
    FINISH_OUT_DEPT("finish_out_dept", "已出科"),
    CANCLE_OUT_DEPT("cancle_out_dept", "取消出科"),

    WAIT_OUT_HOSP("wait_out_hosp", "待出院"),
    FINISH_OUT_HOSP("finish_out_hosp", "已出院"),
    CANCLE_OUT_HOSP("cancle_out_hosp", "取消出院"),

    WAIT_ROTATING_BED("wait_rotating_bed", "待转床"),
    FINISH_ROTATING_BED("finish_rotating_bed", "已转床"),
    CANCLE_ROTATING_BED("cancle_rotating_bed", "取消转床"),

    WAIT_OUT_WARD("wait_out_ward", "手术-病区待转出"),
    FINISH_OUT_WARD("finish_out_ward", "手术-病区已转出"),
    CANCLE_OUT_WARD("cancle_out_ward", "手术-病区取消转出"),

    WAIT_IN_WARD("wait_in_ward", "手术-病区待转入"),
    FINISH_IN_WARD("finish_in_ward", "手术-病区已转入"),
    CANCLE_IN_WARD("cancle_in_ward", "手术-病区取消转入"),

    WAIT_OUT_OPERATION("wait_out_operation", "手术室待转出"),
    FINISH_OUT_OPERATION("finish_out_operation", "手术室已转出"),
    CANCLE_OUT_OPERATION("cancle_out_operation", "手术室取消转出"),

    WAIT_IN_OPERATION("wait_in_operation", "手术室待转入"),
    FINISH_IN_OPERATION("finish_in_operation", "手术室已转入"),
    CANCLE_IN_OPERATION("cancle_in_operation", "手术室取消转入"),

    WAIT_IN_RESUSCITATION("wait_in_resuscitation", "复苏室待转入"),
    FINISH_IN_RESUSCITATION("finish_in_resuscitation", "复苏室已转入"),
    CANCLE_IN_RESUSCITATION("cancle_in_resuscitation", "复苏室取消转入"),

    WAIT_OUT_RESUSCITATION("wait_out_resuscitation", "复苏室待转出"),
    FINISH_OUT_RESUSCITATION("finish_out_resuscitation", "复苏室已转出"),
    CANCLE_OUT_RESUSCITATION("cancle_out_resuscitation", "复苏室取消转出"),

    FINISH_OUT("finish_out", "病人已临时外出"),
    FINISH_IN("finish_in", "病人已归");

    private final String code;
    private final String text;

    CirculationModelEnum(String code, String text) {
        this.code = code;
        this.text = text;
    }

    public String getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static CirculationModelEnum getType(String dataTypeCode) {
        for (CirculationModelEnum enums : CirculationModelEnum.values()) {
            if (enums.code.equals(dataTypeCode)) {
                return enums;
            }
        }
        return null;
    }
}
